#ifndef _OGRE_FRAMEWORK_H_
#define _OGRE_FRAMEWORK_H_

class AppFramework : public Ogre::Singleton<AppFramework>, OIS::KeyListener, OIS::MouseListener
{
public:
			AppFramework(const char* szPath);
			~AppFramework();

	virtual		bool keyPressed(const OIS::KeyEvent &keyEventRef);
	virtual		bool keyReleased(const OIS::KeyEvent &keyEventRef);
	virtual		bool mouseMoved(const OIS::MouseEvent &evt);
	virtual		bool mousePressed(const OIS::MouseEvent &evt, OIS::MouseButtonID id);
	virtual		bool mouseReleased(const OIS::MouseEvent &evt, OIS::MouseButtonID id);

	bool InitFmk(Ogre::String wndTitle, OIS::KeyListener *pKeyListener = 0, OIS::MouseListener *pMouseListener = 0);
	void UpdateFmk(double fDeltaTime);

	Ogre::Root*					m_pRoot;
	Ogre::RenderWindow*			m_pRenderWnd;
	Ogre::Viewport*				m_pViewport;
	Ogre::Log*					m_pLog;
	Ogre::Timer*				m_pTimer;

	OgreBites::InputContext		m_inputContext;
	Ogre::OverlaySystem*		m_pOverlaySystem;
	OIS::InputManager*			m_pInputMgr;

    OgreBites::SdkTrayManager*	m_pTrayMgr;    
	bool						m_bInit;
	
private:
		AppFramework(const AppFramework&);
		AppFramework& operator= (const AppFramework&);

#ifdef OGRE_STATIC_LIB
	Ogre::StaticPluginLoader	mStaticPluginLoader;
#endif 	
	std::string					m_szResourcePath;
};

#endif //_OGRE_FRAMEWORK_H_
